package com.effvi.taoke.dao;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import com.effvi.taoke.dao.bean.TaobaoWord;

@Service
public class TaobaoDao {
	
	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	public List<TaobaoWord> getTaobaoWordForInt(int limited){
		String sql = "select id,word,relWords,updateTime from taobao_words_copy limit " + limited;
//		Object[] params = new Object[] {"id","word","relWords","updateTime"}; 
		System.out.println(sql);
//		return jdbcTemplate.queryForList(sql, params, TaobaoWord.class);
		return jdbcTemplate.queryForList(sql, TaobaoWord.class);
	}
}
